package com.promise.jokerdream.model.configtask

import com.promise.jokerdream.config.task.TaskConfig
import com.promise.jokerdream.network.HttpApiConstants

// 预制的任务配置
object PreConfigTaskMapping {
    
    /**
     * 佣兵快捷指令配置
     */
    val mercenaryTasks = listOf(
        TaskConfig(
            id = "mercenary_右介",
            taskName = "佣兵-右介",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.newMercenary}&sub=1&id=10037"
        ),
        TaskConfig(
            id = "mercenary_鹤",
            taskName = "佣兵-鹤",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.newMercenary}&sub=1&id=10019"
        ),
        TaskConfig(
            id = "mercenary_无崖子",
            taskName = "佣兵-无崖子",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.newMercenary}&sub=1&id=10034"
        ),TaskConfig(
            id = "mercenary_贾诩",
            taskName = "佣兵-贾诩",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.newMercenary}&sub=1&id=10041"
        ),
        TaskConfig(
            id = "mercenary_周瑜",
            taskName = "佣兵-周瑜",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.newMercenary}&sub=1&id=10029"
        ),
        TaskConfig(
            id = "mercenary_猴子",
            taskName = "佣兵-猴子",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.newMercenary}&sub=1&id=10016"
        ),
        TaskConfig(
            id = "mercenary_八神",
            taskName = "佣兵-八神",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.newMercenary}&sub=1&id=10032"
        ),
        TaskConfig(
            id = "mercenary_ 逍遥",
            taskName = "佣兵-逍遥",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.newMercenary}&sub=1&id=10036"
        ),
        TaskConfig(
            id = "mercenary_忍者",
            taskName = "佣兵-忍者",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.newMercenary}&sub=1&id=10018"
        ),
        TaskConfig(
            id = "mercenary_黄盖",
            taskName = "佣兵-黄盖",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.newMercenary}&sub=1&id=10028"
        ),
        TaskConfig(
            id = "mercenary_诸葛",
            taskName = "佣兵-诸葛",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.newMercenary}&sub=1&id=10017"
        ),
        TaskConfig(
            id = "mercenary_郭嘉",
            taskName = "佣兵-郭嘉",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.newMercenary}&sub=1&id=10040"
        ),
    )
    
    /**
     * 奥义快捷指令配置
     */
    val ultimateTasks = listOf(
        TaskConfig(
            id = "ultimate_一孔取消",
            taskName = "奥义一孔-取消",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.skillEnhance}&op=7&storageId=1"
        ),
        TaskConfig(
            id = "ultimate_二孔取消",
            taskName = "奥义二孔-取消",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.skillEnhance}&op=7&storageId=2"
        ),
        TaskConfig(
            id = "ultimate_三孔取消",
            taskName = "奥义三孔-取消",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.skillEnhance}&op=7&storageId=3"
        ),
        TaskConfig(
            id = "ultimate_四孔取消",
            taskName = "奥义四孔-取消",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.skillEnhance}&op=7&storageId=4"
        ),
        TaskConfig(
            id = "ultimate_龙卷风",
            taskName = "奥义一孔-龙卷风",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.skillEnhance}&op=7&storageId=1&skillid=2016"
        ),
        TaskConfig(
            id = "ultimate_天使之翼",
            taskName = "奥义一孔-天使之翼",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.skillEnhance}&op=7&storageId=1&skillid=2024"
        ),
        TaskConfig(
            id = "ultimate_佛山无影脚",
            taskName = "奥义一孔-佛山无影脚",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.skillEnhance}&op=7&storageId=1&skillid=2025"
        ),
        TaskConfig(
            id = "ultimate_天残脚",
            taskName = "奥义一孔-天残脚",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.skillEnhance}&op=7&storageId=1&skillid=2817"
        ),
        TaskConfig(
            id = "ultimate_胶水",
            taskName = "奥义二孔-胶水",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.skillEnhance}&op=7&storageId=2&skillid=2023"
        ),
        TaskConfig(
            id = "ultimate_企鹅吼",
            taskName = "奥义二孔-企鹅吼",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.skillEnhance}&op=7&storageId=2&skillid=2027"
        ),
        TaskConfig(
            id = "ultimate_冲锋",
            taskName = "奥义二孔-冲锋",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.skillEnhance}&op=7&storageId=2&skillid=2129"
        ),
        TaskConfig(
            id = "ultimate_点穴",
            taskName = "奥义二孔-点穴",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.skillEnhance}&op=7&storageId=2&skillid=2467"
        ),
        TaskConfig(
            id = "ultimate_残影",
            taskName = "奥义三孔-残影",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.skillEnhance}&op=7&storageId=3&skillid=2021"
        ),
        TaskConfig(
            id = "ultimate_矿泉水",
            taskName = "奥义三孔-矿泉水",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.skillEnhance}&op=7&storageId=3&skillid=2022"
        ),
        TaskConfig(
            id = "ultimate_人品爆发",
            taskName = "奥义三孔-人品爆发",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.skillEnhance}&op=7&storageId=3&skillid=2179"
        ),
        TaskConfig(
            id = "ultimate_气疗术",
            taskName = "奥义三孔-气疗术",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.skillEnhance}&op=7&storageId=3&skillid=2768"
        ),
        TaskConfig(
            id = "ultimate_快人一步",
            taskName = "奥义四孔-快人一步",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.skillEnhance}&op=7&storageId=4&skillid=2003"
        ),
    )
    
    /**
     * 用药快捷指令配置
     */
    val medicineTasks = listOf(
        TaskConfig(
            id = "medicine_大力丸(赠)",
            taskName = "大力丸(赠)",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.useGoods}&id=3020"
        ),
        TaskConfig(
            id = "medicine_迅捷珠(赠)",
            taskName = "迅捷珠(赠)",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.useGoods}&id=3021"
        ),
        TaskConfig(
            id = "medicine_风之息(赠)",
            taskName = "风之息(赠)",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.useGoods}&id=3022"
        ),
        TaskConfig(
            id = "medicine_大力丸",
            taskName = "大力丸",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.useGoods}&id=3016"
        ),
        TaskConfig(
            id = "medicine_迅捷珠",
            taskName = "迅捷珠",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.useGoods}&id=3017"
        ),
        TaskConfig(
            id = "medicine_风之息",
            taskName = "风之息",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.useGoods}&id=3018"
        )
    )
    
    /**
     * 状态快捷指令配置
     */
    val statusTasks = listOf(
        TaskConfig(
            id = "status_打铁1次",
            taskName = "打铁1次",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.blacksmith}&op=4&type_id=3&times=1"
        ),
        TaskConfig(
            id = "status_打铁5次",
            taskName = "打铁5次",
            executionCount = 1,
            taskLink = "${HttpApiConstants.PcUrls.blacksmith}&op=4&type_id=3&times=5"
        ),
    )
    
    /**
     * 背包快捷指令配置
     */
    val bagTasks = listOf(
        TaskConfig(
            id = "bag_神来拳套(赠)",
            taskName = "神来拳套(赠)",
            executionCount = 50,
            taskLink = "${HttpApiConstants.PcUrls.useGoods}&id=3030"
        ),
        TaskConfig(
            id = "bag_经验木简",
            taskName = "经验木简",
            executionCount = 10,
            taskLink = "${HttpApiConstants.PcUrls.useGoods}&id=3178"
        ),
    )
    
    /**
     * 获取指定快捷指令的任务配置
     */
    fun getTasksByCommand(command: String): List<TaskConfig> {
        return when (command) {
            "佣兵" -> mercenaryTasks
            "奥义" -> ultimateTasks
            "用药" -> medicineTasks
            "状态" -> statusTasks
            "背包" -> bagTasks
            else -> emptyList()
        }
    }
    
    /**
     * 获取所有可用的快捷指令
     */
    fun getAllCommands(): List<String> {
        return listOf("佣兵", "奥义", "用药", "状态", "背包")
    }
}